<?php defined('NABU') || exit ?>

<h1><?= $head_title ?></h1>

<?php require_once 'views/layouts/messages.php' ?>

<form method="post" action="<?= NABU_ROUTES['signup'] ?>">
  <input type="hidden" name="csrf" value="<?= $token ?>">
  <div>
    <label for="name">Nombre completo</label>
    <input type="text" id="name" name="name" minlength="5" maxlength="255" autofocus required>
  </div>
  <div>
    <label for="username">Apodo</label>
    <input type="text" id="username" name="username" minlength="1" maxlength="255" required>
  </div>
  <div>
    <label for="email">Correo institucional</label>
    <input type="email" id="email" name="email" minlength="5" maxlength="255" required>
  </div>
  <div>
    <label for="password">Constraseña</label>
    <input type="password" id="password" name="password" minlength="6" maxlength="255" required>
  </div>
  <div>
    <label for="password_confirm">Confirmar contraseña</label>
    <input type="password" id="password_confirm" name="password_confirm" minlength="6" maxlength="255" required>
  </div>
  <div>
    <input type="submit" name="signup_submit" value="<?= $head_title ?>">
    <p>¿Ya tienes cuenta? <a href="<?= NABU_ROUTES['login'] ?>">Inicia sesión</a>.</p>
  </div>
</form>
